package com.csproj.system.repository.impl;



import com.csproj.system.domain.AuthorityInfo;
import com.csproj.system.repository.custom.AuthorityInfoRepositoryCustom;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import java.util.List;
import java.util.Map;

public class AuthorityInfoRepositoryImpl implements AuthorityInfoRepositoryCustom {

    @PersistenceContext
    private EntityManager em;

    public EntityManager getEm() {
        return em;
    }
    /**
     *权限信息 不分页查询方法
     * @param hsql          hsql语句
     * @param queryParams   参数
     * @return
     */
    public List<AuthorityInfo> findAllList(String hsql, Map<String, Object> queryParams) {
        //拼sql
        String hql = " from AuthorityInfo ai where ai.deletedFlag = 0 " + hsql;
        //查询
        List<AuthorityInfo> feildList = query(hql,queryParams);
        //返回
        return feildList;
    }
}
